﻿using Microsoft.AspNetCore.Identity;

namespace MathTutorPro.Hepler
{
    public class ExceptionHelper
    {

    }

    public class NotFoundException : Exception
    {
        public NotFoundException() { }
        public NotFoundException(string message) : base(message) { }
        public NotFoundException(string message, Exception inner)
            : base(message, inner) { }
    }

    public class BadRequestException : Exception
    {
        public BadRequestException() { }
        public BadRequestException(string message) : base(message) { }
        public BadRequestException(string message, Exception inner)
            : base(message, inner) { }
    }

    public class ApplicationException : Exception
    {
        public ApplicationException() { }
        public ApplicationException(string message) : base(message) { }
        public ApplicationException(string message, IEnumerable<IdentityError> errors)
            : base($"{message}: {string.Join(", ", errors.Select(e => e.Description))}") { }
    }

    public class ChatException : Exception
    {
        public ChatException() { }
        public ChatException(string message) : base(message) { }
        public ChatException(string message, Exception inner)
            : base(message, inner) { }
    }
}
